import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
// import Home from '@/components/Home'
// import Chef from '@/components/Chef'
// import Community from '@/components/Community'
// import Market from '@/components/Market'
// import User from '@/components/User'
// import Detail from '@/components/Detail'
// import Footer from '@/components/Footer'

Vue.use(Router)
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/goodslist',
    name: 'goodslist',
    components: {
      default: () => import('@/components/market/Goodslist')
    }
  },
  {
    path: '/goodsdetail',
    name: 'goodsdetail',
    components: {
      default: () => import('@/components/GoodsDetail')
    }
  },
  {
    path: '/cart',
    name: 'cart',
    components: {
      default: () => import('@/components/Cart')
    }
  },
  {
    path: '/home',
    name: 'home',
    components: {
      default: () => import('@/components/home/Home'),
      footer: () => import('@/components/Footer')
    }
  },
  {
    path: '/search',
    name: 'search',
    components: {
      default: () => import('@/components/Search')
    }
  },
  {
    path: '/message',
    name: 'message',
    components: {
      default: () => import('@/components/Message')
    }
  },
  {
    path: '/searchlist',
    name: 'searchlist',
    components: {
      default: () => import('@/components/SearchList')
    }
  },
  {
    path: '/searchlist2',
    name: 'searchlist2',
    components: {
      default: () => import('@/components/SearchList2')
    }
  },
  {
    path: '/sign_in',
    name: 'sign_in',
    components: {
      default: () => import('@/components/Sign_in')
    }
  },
  {
    path: '/weekgood',
    name: 'weekgood',
    components: {
      default: () => import('@/components/Weekgood')
    }
  },
  {
    path: '/menu_classification',
    name: 'menu_classification',
    components: {
      default: () => import('@/components/Menu_classification')
    }
  },
  {
    path: '/fooddetail',
    name: 'fooddetail',
    components: {
      default: () => import('@/components/Fooddetail')
    }
  },
  {
    path: '/updateworks',
    name: 'updateworks',
    components: {
      default: () => import('@/components/Updateworks')
    }
  },
  {
    path: '/chef',
    name: 'chef',
    components: {
      default: () => import('@/components/chef/Chef'),
      footer: () => import('@/components/Footer')
    }
  },
  {
    path: '/community',
    name: 'community',
    components: {
      default: () => import('@/components/community/Community'),
      footer: () => import('@/components/Footer')
    }
  },
  {
    path: '/market',
    name: 'market',
    components: {
      default: () => import('@/components/market/Market'),
      footer: () => import('@/components/Footer')
    }
  },
  {
    path: '/user',
    name: 'user',
    components: {
      default: () => import('@/components/user/User')
    }
  },
  {
    path: '/citychoice',
    name: 'citychoice',
    components: {
      default: () => import('@/components/Citychoice')
    }
  },
  {
    path: '/register',
    name: 'register',
    components: {
      default: () => import('@/components/user/Register')
    }
  },
  {
    path: '/login',
    name: 'login',
    components: {
      default: () => import('@/components/user/Login')
    }
  },
  {
    path: '/set',
    name: 'set',
    components: {
      default: () => import('@/components/user/Set')
    }
  },
  {
    path: '/userinfo',
    name: 'userinfo',
    components: {
      default: () => import('@/components/user/Userinfo')
    }
  },
  {
    path: '/usercenter',
    name: 'usercenter',
    components: {
      default: () => import('@/components/user/Usercenter')
    }
  },
  {
    path: '/mine',
    name: 'mine',
    components: {
      default: () => import('@/components/user/Mine'),
      footer: () => import('@/components/Footer')
    }
  }
]

const router = new Router({
  routes: routes
})

export default router
